<?php include_once('../layouts/header.php') ?>
<div class="easyui-layout" data-options="fit:true">
    <div data-options="region:'center',split:true,border:false">
        <div class="container">
            <fieldset><legend><code>文件上传 upload</code></legend></fieldset>
            <form id="form-upload"
             data-options="
                form:{
                    url:'/data/index.php?type=test',
                    id:'#form-upload',
                },
             ">
                <div class="form-box sm-form">
                    <div class="form-item row">
                        <div class="form-input col-12">
                            <input name="zhhui" class="easyui-filebox easyui-validatebox" validType="fileSize[1,'MB']" data-options="multiple:true,required:true,showClear:true,width:'100%',prompt:'请选择要上传的文件'">
                        </div>
                    </div>
                    <div class="form-item row">
                        <div class="form-input col-12">
                            <input name="file[]" class="easyui-combogrid fcombogrid easyui-validatebox"
                             data-options="
                                prompt:'请选择要保存的文件',
                                width:'100%',
                                required:true,
                                showClear:true,
                                idField:'filePath',
                                limit:[1,'MB'],
                                textField:'fileName',
                                checkOnSelect:false,
                                selectOnCheck:true,
                                progress:true,
                                multiple:true,
                                accept:'*',
                                url:'/data/index.php?type=filelist',
                             ">
                        </div>
                    </div>
                    <div class="form-item row">
                        <div class="form-input input-group groups col-12">
                            <div class="group-text">上传图片(带缩略图)</div>
                            <div class="group-input">
                                <div class="zfilebox"
                                 data-options="
                                    height:200,
                                    url:'/data/index.php?type=filelist&m=u',
                                    name:'zimgfile',
                                    limit:[1,'MB'],
                                    view:false,
                                    imageUrl:'/data/files/example.jpg'
                                 ">
                                </div>
                                <div class="notice notice-gray">这里是辅助性文字</div>
                            </div>
                        </div>
                    </div>
                    <div class="form-item row">
                        <div class="form-input input-group groups col-12">
                            <div class="group-text">自动上传文件</div>
                            <div class="group-input">
                                <div class="zfwrap"
                                 data-options="
                                    url:'/data/index.php?type=filelist&m=u',
                                    name:'zimport',
                                    limit:[20,'MB'],
                                    autoUpload:true,
                                    thumbPic:false,
                                    accept:'*',
                                 ">
                                    <div class="btn btn-primary" onclick="$.thumbFile.change(this)">导入数据
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <button type="button" class="btn btn-primary btn-block" onclick="$.submitForm(this)">保存</button>
            </form>
        </div>
    </div>
</div>


<?php include_once('../layouts/footer.php') ?>